# -*- coding: utf-8 -*-
from flask import Blueprint
from common.libs.utils.json_response import JsonResponse
from common.models.user import TbUser
from common.schema.users_schema import UsersSchema
route_index = Blueprint('index_page', __name__)

@route_index.route("/")
def index():
    sch = UsersSchema()
    user_info = TbUser.query.all()
    data = sch.dump(user_info, many=True)
    return JsonResponse.success(data, msg="测试")


@route_index.before_request
def before():
    return JsonResponse.error(500, "你还没登录")
